<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
    <title>title</title>
    <link rel="stylesheet" type="text/css" href="../css/api.css"/>
    <style>
    	html,body{
    	height: 98%;
			background: transparent;
			-webkit-touch-callout: none;
			font-family: Tahoma, Geneva, sans-serif;
			font-style: normal;
		}
		#dialog{
			background-color: #e7e7e7; border-radius: 6px;
			position: absolute; margin: auto;
			left: 0; right: 0; top: 0; bottom: 0;
			width: 80%; height: 225px;
			-webkit-transition: all .1s;
			transition:all .1s;
			-webkit-transform: scale(0);
			transform:scale(0);
			opacity: 0;
		}
		#dialog.in{
			-webkit-transform: scale(1);
			transform:scale(1);
			opacity: 1;
		}
    .text{
      width: 80%;
      height: 125px;
      margin: 0 auto;
      border: 1px solid #dcdcdc;
      padding: 5px;
      border-radius: 0.5rem;
      margin: 20px;
    }
    .Navbtn {
        background-color: #44dc12;
        color: #fff;
        padding: 5px;
        border-radius: 5px;
        margin-right: 10px;
        margin-left: 30%;
    }
    .Navbtn1{
      background-color: #14bce2;
      color: #fff;
      padding: 5px;
      border-radius: 5px;
    }
    </style>
</head>
<body>
	<div id="dialog">
    <textarea class="text" placeholder="请输入内容~" id="text"></textarea>
    <button class="Navbtn" onclick="sendTextMessage()">发送</button>
    <button class="Navbtn1" onclick="closed()">取消</button>
		<!-- <img id="erweima" src="../image/myerweima.png" tapmode onclick="api.closeFrame()"/> -->
	</div>
</body>
<script type="text/javascript" src="../script/api.js"></script>
<script type="text/javascript" src="../script/common.js"></script>
<script type="text/javascript" src="../script/jquery-1.8.3.js"></script>
<script type="text/javascript">
	$('#dialog').addClass('in');
  var userinfo = $api.getStorage('userinfo');
  var mecshop
  var id = ''
  var kename
  var qiniuLive
  var rong
  var ry_token
  var room
	apiready = function(){
        id = api.pageParam.id
				kename = api.pageParam.kename
       // rong = api.require('rongCloud2'); //加入融云聊天室
       // ry_token = $api.getStorage('ry_token');

	};

				 function closed() {
			     var dialog = $("#dialog")[0];
			     $('#dialog').removeClass('in');
			     setTimeout(function(){
			       api.closeFrame();
			     },200);
			   }


			   function sendTextMessage() {
			     var msg = $("#text").val();
			     var jsfun = "sendRoomTextMessage('"+ msg +"')";
			     var jsfun = "sendContent('"+ msg +"')";
			     api.execScript({
			         //name: 'lookcur',
							 name: kename,
			         script: jsfun
			     });
			 		closed();
			   }
</script>
</html>
